package com.youlu.campus.entity.commission;


import com.youlu.campus.base.base.EntityBase;
import lombok.Getter;
import lombok.Setter;
import org.springframework.data.annotation.Transient;
import org.springframework.data.mongodb.core.index.CompoundIndex;
import org.springframework.data.mongodb.core.index.CompoundIndexes;
import org.springframework.data.mongodb.core.index.Indexed;
import org.springframework.data.mongodb.core.mapping.Document;

import java.util.Date;

/**
 * 用户参加分销渠道报名
 */
@Setter
@Getter
@Document(collection = "user_participate_distributor_channel_info")
@CompoundIndexes({
        @CompoundIndex(name = "userId_1_activityId_-1",unique = true,def = "{'userId':-1,'activityId':-1,'activityChannelId':-1}")
})
public class UserParticipateDistributorChannelInfo extends EntityBase {

    /**
     * 活动渠道ID
     */
    @Indexed
    private String activityChannelId;
    @Transient
    private String activityChannelName;

    private String openId;

    private String unionId;
    @Indexed
    private String name;
    @Indexed
    private String mobile;


    private String appId;

    private String platform;

    private String userId;
    @Indexed
    private String activityId;
    @Transient
    private String activityName;

    /**
     * 校赛得分
     */
    private Double qaScore = 0D;
    /**
     * 省赛得分
     */
    private Double provinceQaScore= 0D;
    /**
     * 国赛得分
     */
    private Double countryQaScore= 0D;

    /**
     * 报名时间
     */
    //@Indexed(background = true)
    private Date signUpTime;

    /**
     * 大学名称
     */
    private String universityName;

    /**
     * 大学ID
     */
    private String universityId;

    /**
     * 昵称
     */
    //@Indexed
    private String nickName;

    /**
     * 渠道所属人ID
     */
    private String channelOwnerId;

    /**
     * 渠道所属人姓名
     */
    private String channelOwnerName;


}
